<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<!--fragment header-->
<head th:fragment="top">
  <link href="/admin/images/favicon.ico" rel="icon" th:href="@{/static/admin/images/favicon.ico}"
        type="image/ico">

  <link rel="stylesheet" th:href="@{/static/admin/css/bootstrap.min.css}">
  <link rel="stylesheet" th:href="@{/static/admin/css/materialdesignicons.min.css}">
  <link rel="stylesheet" th:href="@{/static/admin/css/style.min.css}">

  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
        name="viewport"/>

  <title th:text="|${session.title}--${title}|"></title>

  <!--对话框-->
  <link rel="stylesheet" th:href="@{/static/admin/js/jconfirm/jquery-confirm.min.css}">

</head>
<!--fragment header-->
<!--头部信息-->
<div th:fragment="header">

  <header class="lyear-layout-header">

    <nav class="navbar navbar-default">
      <div class="topbar">

        <div class="topbar-left">
          <div class="lyear-aside-toggler">
            <span class="lyear-toggler-bar"></span>
            <span class="lyear-toggler-bar"></span>
            <span class="lyear-toggler-bar"></span>
          </div>
          <span class="navbar-page-title" th:text="${title}"> 缩放 </span>
        </div>

        <ul class="topbar-right">
          <li class="dropdown dropdown-profile">
            <a data-toggle="dropdown" href="javascript:void(0)">
              <img alt="个人信息"
                   class="img-avatar img-avatar-48 m-r-10"
                   th:src="@{/static/admin/images/users/avatar.jpg}"/>
              <span th:text="${session.loginuser.username}+' 管理'">个人信息 <span
                  class="caret"></span></span>
            </a>
            <ul class="dropdown-menu dropdown-menu-right">
              <!--<li><a href="lyear_pages_profile.html"><i class="mdi mdi-account"></i> 个人信息</a></li>-->
              <li><a href="/sys/editself.do"><i class="mdi mdi-lock-outline"></i> 修改密码</a>
              </li>
              <li><a href="/sys/flushcache.do"><i class="mdi mdi-delete"></i> 清空缓存</a></li>
                <li><a href="/sys/helppage.do"><i class="mdi mdi-help-circle"></i> 帮助</a></li>
              <li class="divider"></li>
              <li><a th:href="@{/sys/logout.do}"><i class="mdi mdi-logout-variant"></i> 退出登录</a>
              </li>
            </ul>
          </li>
          <!--切换主题配色-->
          <li class="dropdown dropdown-skin">
            <span class="icon-palette" data-toggle="dropdown"><i class="mdi mdi-palette"></i></span>
            <ul class="dropdown-menu dropdown-menu-right" data-stopPropagation="true">
              <li class="drop-title"><p>主题</p></li>
              <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input checked id="site_theme_1" name="site_theme" type="radio" value="default">
                    <label for="site_theme_1"></label>
                  </span>
                <span>
                    <input id="site_theme_2" name="site_theme" type="radio" value="dark">
                    <label for="site_theme_2"></label>
                  </span>
                <span>
                    <input id="site_theme_3" name="site_theme" type="radio" value="translucent">
                    <label for="site_theme_3"></label>
                  </span>
              </li>
              <li class="drop-title"><p>LOGO</p></li>
              <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input checked id="logo_bg_1" name="logo_bg" type="radio" value="default">
                    <label for="logo_bg_1"></label>
                  </span>
                <span>
                    <input id="logo_bg_2" name="logo_bg" type="radio" value="color_2">
                    <label for="logo_bg_2"></label>
                  </span>
                <span>
                    <input id="logo_bg_3" name="logo_bg" type="radio" value="color_3">
                    <label for="logo_bg_3"></label>
                  </span>
                <span>
                    <input id="logo_bg_4" name="logo_bg" type="radio" value="color_4">
                    <label for="logo_bg_4"></label>
                  </span>
                <span>
                    <input id="logo_bg_5" name="logo_bg" type="radio" value="color_5">
                    <label for="logo_bg_5"></label>
                  </span>
                <span>
                    <input id="logo_bg_6" name="logo_bg" type="radio" value="color_6">
                    <label for="logo_bg_6"></label>
                  </span>
                <span>
                    <input id="logo_bg_7" name="logo_bg" type="radio" value="color_7">
                    <label for="logo_bg_7"></label>
                  </span>
                <span>
                    <input id="logo_bg_8" name="logo_bg" type="radio" value="color_8">
                    <label for="logo_bg_8"></label>
                  </span>
              </li>
              <li class="drop-title"><p>头部</p></li>
              <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input checked id="header_bg_1" name="header_bg" type="radio" value="default">
                    <label for="header_bg_1"></label>
                  </span>
                <span>
                    <input id="header_bg_2" name="header_bg" type="radio" value="color_2">
                    <label for="header_bg_2"></label>
                  </span>
                <span>
                    <input id="header_bg_3" name="header_bg" type="radio" value="color_3">
                    <label for="header_bg_3"></label>
                  </span>
                <span>
                    <input id="header_bg_4" name="header_bg" type="radio" value="color_4">
                    <label for="header_bg_4"></label>
                  </span>
                <span>
                    <input id="header_bg_5" name="header_bg" type="radio" value="color_5">
                    <label for="header_bg_5"></label>
                  </span>
                <span>
                    <input id="header_bg_6" name="header_bg" type="radio" value="color_6">
                    <label for="header_bg_6"></label>
                  </span>
                <span>
                    <input id="header_bg_7" name="header_bg" type="radio" value="color_7">
                    <label for="header_bg_7"></label>
                  </span>
                <span>
                    <input id="header_bg_8" name="header_bg" type="radio" value="color_8">
                    <label for="header_bg_8"></label>
                  </span>
              </li>
              <li class="drop-title"><p>侧边栏</p></li>
              <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input checked id="sidebar_bg_1" name="sidebar_bg" type="radio" value="default">
                    <label for="sidebar_bg_1"></label>
                  </span>
                <span>
                    <input id="sidebar_bg_2" name="sidebar_bg" type="radio" value="color_2">
                    <label for="sidebar_bg_2"></label>
                  </span>
                <span>
                    <input id="sidebar_bg_3" name="sidebar_bg" type="radio" value="color_3">
                    <label for="sidebar_bg_3"></label>
                  </span>
                <span>
                    <input id="sidebar_bg_4" name="sidebar_bg" type="radio" value="color_4">
                    <label for="sidebar_bg_4"></label>
                  </span>
                <span>
                    <input id="sidebar_bg_5" name="sidebar_bg" type="radio" value="color_5">
                    <label for="sidebar_bg_5"></label>
                  </span>
                <span>
                    <input id="sidebar_bg_6" name="sidebar_bg" type="radio" value="color_6">
                    <label for="sidebar_bg_6"></label>
                  </span>
                <span>
                    <input id="sidebar_bg_7" name="sidebar_bg" type="radio" value="color_7">
                    <label for="sidebar_bg_7"></label>
                  </span>
                <span>
                    <input id="sidebar_bg_8" name="sidebar_bg" type="radio" value="color_8">
                    <label for="sidebar_bg_8"></label>
                  </span>
              </li>
            </ul>
          </li>
          <!--切换主题配色-->


        </ul>

      </div>
    </nav>

  </header>


</div>
<!--End 头部信息-->

<div th:fragment="leftmenu">
  <!--左侧导航-->
  <aside class="lyear-layout-sidebar">

    <!-- logo -->
    <div class="sidebar-header" id="logo">
      <a th:href="@{/sys/index.do}"><img alt="管理" th:src="@{/static/admin/images/logo-sidebar.png}"
                                         title="管理"/></a>
    </div>
    <div class="lyear-layout-sidebar-scroll">

      <nav class="sidebar-main">
        <ul class="nav nav-drawer">
          <li class="nav-item active"><a th:href="@{/sys/index.do}"><i class="mdi mdi-home"></i>
            后台首页</a></li>
          <th:block th:each="top:${session.userauthlist}">
            <!--  <li class="nav-item nav-item-has-subnav"  >-->
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i
                  th:class="|mdi ${top.icon}|"></i>[[${top.menuname}]]</a>
              <ul class="nav nav-subnav" th:if="${top.child.size()>0}">
                <li th:each="second:${top.child}">
                  <a href="javascript:" th:class="|mdi ${second.icon}|" th:href="@{${second.url}}"
                     th:text="| ${second.menuname}|"></span></a>
                </li>
              </ul>
            </li>
          </th:block>


        </ul>
      </nav>

    </div>

  </aside>
  <!--End 左侧导航-->
</div>

<!--fragment tail-script-->
<div th:fragment="tail-script">
  <style>
    tr:hover {
      background: #a5b3c7;
    }
  </style>
  <script th:src="@{/static/admin/js/jquery.min.js}" type="text/javascript"></script>
  <script th:src="@{/static/admin/js/bootstrap.min.js}" type="text/javascript"></script>
  <script th:src="@{/static/admin/js/perfect-scrollbar.min.js}" type="text/javascript"></script>
  <script th:src="@{/static/admin/js/main.min.js}" type="text/javascript"></script>

  <!--  &lt;!&ndash;图表插件&ndash;&gt;
    <script th:src="@{/static/admin/js/Chart.js}" type="text/javascript"></script>
  -->
  <!--对话框-->
  <script th:src="@{/static/admin/js/jconfirm/jquery-confirm.min.js}"></script>

  <script th:src="@{/static/admin/js/myjs/confirm.js}" type="text/javascript"></script>
  -->
  <script>

    // 保存类属性
    function savestage(index, clz) {
      sessionStorage.setItem(index, clz)
    }

    // 侧边栏点击事件
    function sideclick() {
      $('.sidebar-main a').each(function (index, element) {

        let parent = $(this).parent("li")
        let parentclz = parent.attr('class')

        if ((parentclz != undefined) && (parentclz != null)) {
          savestage(index, parentclz)
        }
      })
    }

    // 恢复侧边栏状态
    function siderestore() {
      $('.sidebar-main a').each(function (index, element) {
        let clz = sessionStorage.getItem(index)
        if ((clz != undefined) && (clz != null)) {
          let parent = $(element).parent('li')
          parent.attr('class', clz)
        }
      })
    }

    $(document).ready(function () {
      // 注册侧边栏点击事件,记录侧边栏状态
      $('.sidebar-main a').on('click', function () {
        $('.active').removeClass('active')
        $(this).parent('li').addClass('active')


        sideclick()
      })

      // 恢复侧边栏状态
      siderestore()

      // 选中菜单 变色
      let currentpath = window.location.pathname

      $('.nav-item').each(function (i, e) {
        if ($(e).children('a').attr('href') === currentpath) {
          $(e).addClass('active')
        } else {
          $(e).removeClass('active')
        }
      })

      /*判断菜单列表是否包含子元素*/
      $('.nav-item').each(function (i, e) {
        if ($(e).find('li').length > 0) {
          if (!$(e).hasClass('nav-item-has-subnav')) {
            $(e).addClass('nav-item-has-subnav')
          }

        }else
        {
          $(e).removeClass('nav-item-has-subnav')
        }
      });

    })


  </script>

</div>

<!--fragment tail-script-->